﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Lottery.MediaData.Core {
    /// <summary>
    /// 文字
    /// </summary>
    public class WZ {
        private string three;
        private string one;
        private string zero;

        /// <summary>
        /// 3
        /// </summary>
        public string Three {
            get { return three; }
            set {
                three = value;
                switch (three) {
                    case "大":
                    case "首":
                        D = "3"; break;
                    case "中":
                    case "次":
                        Z = "3"; break;
                    case "小":
                    case "末":
                        X = "3"; break;
                    default:
                        break;
                }
            }
        }

        /// <summary>
        /// 1
        /// </summary>
        public string One {
            get { return one; }
            set {
                one = value;
                switch (one) {
                    case "大":
                    case "首":
                        D = "1"; break;
                    case "中":
                    case "次":
                        Z = "1"; break;
                    case "小":
                    case "末":
                        X = "1"; break;
                    default:
                        break;
                }
            }
        }

        /// <summary>
        /// 0
        /// </summary>
        public string Zero {
            get { return zero; }
            set {
                zero = value;
                switch (zero) {
                    case "大":
                    case "首":
                        D = "0"; break;
                    case "中":
                    case "次":
                        Z = "0"; break;
                    case "小":
                    case "末":
                        X = "0"; break;
                    default:
                        break;
                }
            }
        }

        private string preText;

        /// <summary>
        /// 预测 大 中 小
        /// </summary>
        public string PreText {
            get { return preText; }
            set {
                preText = value;
                switch (preText) {
                    case "大":
                    case "首":
                        PreNumber = D; break;
                    case "中":
                    case "次":
                        PreNumber = Z; break;
                    case "小":
                    case "末":
                        PreNumber = X; break;
                    default:
                        break;
                }
            }
        }

        /// <summary>
        /// 大
        /// </summary>
        public string D { get; private set; }

        /// <summary>
        /// 中
        /// </summary>
        public string Z { get; private set; }

        /// <summary>
        /// 小
        /// </summary>
        public string X { get; private set; }

        public string PreNumber { get; private set; }
    }
}
